package com.company.skill;

import com.company.inter.Sets;

import java.util.ArrayList;

/**
 * @description:
 * @author: ZhaoYicong
 * @date: Created in 2020/5/13 22:40
 * @version: v1.0
 * @modified By:
 */
public class PskillSet implements Sets {
    ArrayList<Pskill> skills = new ArrayList<>();

    @Override
    public Pskill searchById(String id) {
        Pskill pskill=null;
        for (Pskill item:skills){
            if (item.getId().equals(id)){
                pskill=item;
                break;
            }
        }
        return pskill;
    }
    @Override
    public void add(Object object) {
        if (object instanceof Pskill){
            skills.add((Pskill) object);
        }

    }

    public ArrayList<Pskill> getSkills() {
        return skills;
    }

    public void setSkills(ArrayList<Pskill> skills) {
        this.skills = skills;
    }

    public PskillSet()  {
    }
}
